package com.roc.steelend.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.roc.steelend.pojo.CompanyMoney;
import com.roc.steelend.pojo.KaipingGuy;
import com.roc.steelend.pojo.KaipingOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.util.HashMap;
import java.util.List;

@Repository
public interface KaipingOrderMapper extends BaseMapper<KaipingOrder> {

//    smallTypeId, warehouseId, specification, kaipingguyName, showAllPayInvoice, showPay, showInvoice, startDate, endDate
    List<KaipingOrder> findALlMsg(@Param("smallTypeId")Integer smallTypeId,
                                  @Param("warehouseId")Integer warehouseId,
                                  @Param("specification")BigDecimal specification,
                                  @Param("weight")BigDecimal weight,
                                  @Param("kaipingguyName")String kaipingguyName,
                                  @Param("showAllPayInvoice")Boolean showAllPayInvoice,
                                  @Param("showPay")Boolean showPay,
                                  @Param("showInvoice")Boolean showInvoice,
                                  @Param("startDate") Date startDate,
                                  @Param("endDate")Date endDate);

    Integer kaipingFindRecodingCount(@Param("smallTypeId")Integer smallTypeId,
                                 @Param("warehouseId")Integer warehouseId,
                                 @Param("specification")BigDecimal specification,
                                 @Param("weight")BigDecimal weight,
                                 @Param("kaipingguyName")String kaipingguyName,
                                 @Param("showAllPayInvoice")Boolean showAllPayInvoice,
                                 @Param("showPay")Boolean showPay,
                                 @Param("showInvoice")Boolean showInvoice,
                                 @Param("startDate") Date startDate,
                                 @Param("endDate")Date endDate);

    Integer updateReconciliationByKaipingGuy(@Param("kaipingguy")Integer kaipingguyId,
                                         @Param("reconciliationKaipingId") BigInteger reconciliationKaipingId);

    Integer updateTiaoPiaoByKaipingGuy(@Param("kaipingguy")Integer kaipingguyId,
                                             @Param("tiaoPiaoKaipingId") BigInteger tiaoPiaoKaipingId);


    Integer selectEchartsByPay();

    Integer selectEchartsByInvoice();

    List<HashMap<String,Object>> selectAllBuKaipingguyId(@Param("kaipingguyId")Integer kaipingguyId);
    List<HashMap<String,Object>> selectAllBuKaipingguyIdInvoice(@Param("kaipingguyId")Integer kaipingguyId);


}
